﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ColdSun.BankManagements
{
    public partial class FrmLogin : Form
    {
        public FrmLogin()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if ((txtUserName.Text == "Diem" && txtPassword.Text == "DiemYM") ||
                (txtUserName.Text == "ColdSun" && txtPassword.Text == "Nothing"))
            {
                this.Visible = false;
                FrmMain frmMain = new FrmMain();
                frmMain.ShowDialog();
                this.Close();
            }
            else
            {
                MessageBox.Show("Your name or password is incorrect. Please try again!", "Login failed!");
            }
        }

    }
}
